﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TestCase.Master" AutoEventWireup="true" CodeBehind="NavigationTests.aspx.cs" Inherits="OpenWaves.Web.Tests.NavigationTests" %>
<%@ Register TagPrefix="a" Namespace="OpenWaves.Web.Tests" Assembly="OpenWaves.Web.Tests" %>
<%@ Import Namespace="OpenWaves" %>
<asp:Content ID="Content2" ContentPlaceHolderID="TestCasePlaceHolder" runat="server">

    <div>
        Currrent url: <asp:TextBox runat="server" ID="txtCurrentUrl" Text="/a/1/x"/> Max levels: <asp:TextBox runat="server" ID="txtMaxNestingLevel" Text="5" />
    </div>
    <div>
        <a:TestNavigation runat="server" DataSource="<%# this.TestNodes %>" CurrentUrl="<%# txtCurrentUrl.Text %>" MaxNestingLevel="<%# Int32.Parse(txtMaxNestingLevel.Text) %>">
            <Template>
                <ul>
                    <ow:ChildNodesPlaceHolder runat="server" />
                </ul>
            </Template>
            
            <NodeTemplate>
                <li>
                    <span><%#Html.Encode(Container.Node.Name) %> Level: <%#Container.NodeLevel %></span>
                </li>
            </NodeTemplate>
            
            <ExpandedNodeTemplate>
                <li class="Expanded">
                    <span><%#Html.Encode(Container.Node.Name) %></span>
                    <ow:ChildNodesPlaceHolder runat="server">
                        <ul>
                            <ow:ItemsPlaceHolder runat="server" />
                        </ul>
                    </ow:ChildNodesPlaceHolder>
                </li>
            </ExpandedNodeTemplate>
            
            <CurrentNodeTemplate>
                <li class="Current">
                    [<%#Html.Encode(Container.Node.Name) %>]
                </li>
            </CurrentNodeTemplate>
        </a:TestNavigation>
    </div>
</asp:Content>
